# Stage 2 Deployment Package # Explanation FNST_Quotation_List_0531.xlsx According to the quotation of each development project in the contract, the acceptance amount and reason refer to the following description: 1. The acceptance objects of one development are Personal Expense and System Enviroment Deployment Expense, the corresponding amount is: 42400 RMB 2. In the quotation, the cost of Travel Expense, IOS APP listing, and Android APP listing cost totaled 10526 RMB, which will not be the subject of acceptance this time. Because no actual cost has been incurred in this development, it is expected that it will be incurred during the secondary development, and it will be checked and accepted together with the secondary development product at that time. Development product and description: 1. Android APP Android package (apk format) 2. IOS APP installation package (ipa format) 3. According to the list of Party A’s needs, update the server-side related front-end pages, which have been deployed on Party A’s New York University Shanghai server 4. A guidebook for building a server environment 5. Relevant codes (Android APP, IOS APP, server-side code) are provided in the secondary development # Quotation List - 3rd party login development fee - iOS app fee - Android app fee # Products - Android app APK - iOS app IPA - Environment setup document ## Android APK Open the emulator from the Android studio, directly drag and drop the file into the emulator. It is the same version as last time. [https://www.geeksforgeeks.org/how-to-install-an-apk-on-the-emulator-in-android-studio/](https://www.geeksforgeeks.org/how-to-install-an-apk-on-the-emulator-in-android-studio/) ## iOS IPA Ask later to be included in the list. ## Environment setup [NYU Shanghai MOOC](Stage 2 Deployment Package 181a6ae46f7044518204a6f88f4ee601/NYU Shanghai MOOC 4fbfad10c1b848c6920f8a020e0f6b05.md) 1. Execute the command in any directory *`export OPENEDX_RELEASE=open-release/ficus.4`* 2. Create a new config.yml, the content is as follows: ```bash *EDXAPP_LMS_BASE: "minicourse.shanghai.nyu.edu" EDXAPP_CMS_BASE: "studio.minicourse.shanghai.nyu.edu"* ``` > This setting is modified according to the actual domain name applied for > 3. Download the installation script and execute ```bash *wget [https://raw.githubusercontent.com/edx/configuration/$OPENEDX_RELEASE/util/install/ansible-bootstrap.sh](https://raw.githubusercontent.com/edx/configuration/$OPENEDX_RELEASE/util/install/ansible-bootstrap.sh)  -O-| sudo -E bash wget [https://raw.githubusercontent.com/edx/configuration/$OPENEDX_RELEASE/util/install/generate-passwords.sh](https://raw.githubusercontent.com/edx/configuration/$OPENEDX_RELEASE/util/install/generate-passwords.sh) -O-| sudo -E bash wget [https://raw.githubusercontent.com/edx/configuration/$OPENEDX_RELEASE/util/install/sandbox.sh](https://raw.githubusercontent.com/edx/configuration/$OPENEDX_RELEASE/util/install/sandbox.sh) -O-| sudo -E bash* ``` > In a bad network environment, first wget each script, and then execute sudo bash xx.sh in turn > 4. Checkout your own code from Github After setting up the official production environment, add the remote library in the `/edx/app/edxapp/edx-platform` directory: ```bash *git remote add fnst https://gitlab.com/fnst-mooc/edx-platform.git g*it remote -v ``` There will be two remotes at this point: **origin** on github and **fnst** on gitlab, checkout nyu from fnst remote: ```bash *git checkout -b nyu-sh-ficus --track fnst/nyu-sh-ficus* ``` 5. Data migration ```bash sudo -u edxapp /edx/bin/python.edxapp /edx/app/edxapp/edx-platform/manage.py lms --settings=aws makemigrations sudo -u edxapp /edx/bin/python.edxapp /edx/app/edxapp/edx-platform/manage.py lms --settings= aws migrate ``` 6. Internationalized file generation 1. Prepare the environment ```bash sudo -H -u edxapp bash source /edx/app/edxapp/edxapp_env cd /edx/app/edxapp/edx-platform ``` 2. Compile internationalized po files ```bash *django-admin.py compilemessages -v1* ``` 3. Compile the internationalized js.po file ```bash python manage.py lms compilejsi18n python manage.py cms compilejsi18n ``` 7. Compile static resources 1. Prepare the environment ```bash sudo -H -u edxapp bash source /edx/app/edxapp/edxapp_env cd /edx/app/edxapp/edx-platform ``` 2. Compile static resources ```bash paver update_assets cms --settings=aws paver update_assets lms --settings=aws ``` 3. Edit configuration files At the location /edx/app/edxapp/, edit the `lms.env.json` , `cms.env.json` to modify the email and other related information 8. Restart all services ```bash *sudo /edx/bin/supervisorctl restart all* ``` # Files [验收内容及说明.zip](https://drive.google.com/file/d/1PkHQiGDaxYajt_2RXw8HBvkJiGjqLhUL/view?usp=drivesdk)